package com.livesource.client.webservices;

import com.livesource.client.LiveSourceGlobalVariables;
import com.livesource.client.model.project.Project;
import com.livesource.client.webservices.github.RequestGithubListFiles;
import com.livesource.client.webservices.subversion.RequestSubversionListFiles;

public class LoadProjectFiles {

	public LoadProjectFiles() {

		this(null);
	}

	public LoadProjectFiles(String panelSelected) {

		if (Project.REPOSITORY_TYPE_SUBVERSION
				.equals(LiveSourceGlobalVariables.currentProject
						.getRepositoryType())) {

			RequestSubversionListFiles
					.getJsonpRequest(LiveSourceGlobalVariables.currentProject);

		} else if (Project.REPOSITORY_TYPE_GITHUB
				.equals(LiveSourceGlobalVariables.currentProject
						.getRepositoryType())) {

			RequestGithubListFiles
					.getJsonpRequest(LiveSourceGlobalVariables.currentProject);
		}

	}
}
